<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<html>
    <head>

	<title>Motorbike tour organizing system | Register</title>


    </head>

    <body>

	<f:view>
	    <rich:panel header="Register">
                    <table>
                        <h:form>
                        <tr><td colspan="2"><h:outputText value="#{newUser.error}" style="color:darkred"/></tr>
                        <tr><td>Login name:    <td><h:inputText label="Username" id="username" value="#{newUser.user.name}" required="true"/>
                            <h:message for="username" style="color:darkred" /></tr>
                        <tr><td>E-mail:        <td><h:inputText label="Email" id="email" value="#{newUser.user.email}" validator="#{editUser.validateEmail}" />
                            <h:message for="email" style="color:darkred" /></tr>
                        <tr><td>Password:      <td><h:inputSecret label="Password" id="password" value="#{newUser.user.password}" required="true"/>
                            <h:message for="password" style="color:darkred" /></tr>
                        <tr><td>Password again:<td>
                                <h:inputSecret label="Retype password" id="password2" value="#{newUser.password2}" required="true">
                                    <f:validateLength minimum = "8" maximum = "25"/>
                                </h:inputSecret>
                            <h:message for="password2" style="color:darkred" /></tr>
                        <tr><td><h:commandButton value="Register" action="#{newUser.add}"/>
                        </h:form>
                            <td><h:form><p><h:commandButton value="Back" action="login"/></p></h:form></tr>
                    </table>
	    </rich:panel>

	</f:view>
    </body>
</html>

